package com.eep.order;

import com.eep.common.Customer;

public class OrderSummary extends Order {

    protected Customer customer;

    public OrderSummary() {
    }

    public OrderSummary(int id, String date, boolean shipped, String firstName, String lastName) {
        super(id, date, shipped);
        this.customer = new Customer();
        this.customer.setFirstName(firstName);
        this.customer.setLastName(lastName);
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    @Override
    public String toString() {
        return (isShipped() ? "SHIPPED " : "") + "ORDER # " + id + " " + date + " " + customer.getFirstName() + " " + customer.getLastName();
    }



}
